package domain;

import java.util.*;


public class Ranking {

	// Atributos
	private String id=null;
	private int rol1;
	private int rol2;
	private int rol3;
	private int rol4;
	private int rol5;
	private List<Ranking> rankingList=new LinkedList();
	
	public Ranking(int rol1, int rol2, int rol3, int rol4,
			int rol5) {
		
		this.rol1 = rol1;
		this.rol2 = rol2;
		this.rol3 = rol3;
		this.rol4 = rol4;
		this.rol5 = rol5;
	}
	

	public Ranking() {
	
		// TODO Auto-generated constructor stub
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getRol1() {
		return rol1;
	}

	public void setRol1(int rol1) {
		this.rol1 = rol1;
	}

	public int getRol2() {
		return rol2;
	}

	public void setRol2(int rol2) {
		this.rol2 = rol2;
	}

	public int getRol3() {
		return rol3;
	}

	public void setRol3(int rol3) {
		this.rol3 = rol3;
	}

	public int getRol4() {
		return rol4;
	}

	public void setRol4(int rol4) {
		this.rol4 = rol4;
	}

	public int getRol5() {
		return rol5;
	}

	public void setRol5(int rol5) {
		this.rol5 = rol5;
	}

	public List<Ranking>  getRankingList() {
		return rankingList;
	}

	public void setRankingList(List<Ranking>  rankingList) {
		this.rankingList = rankingList;
	}
	
	public boolean anadir_ranking(Ranking rank){
		boolean enc=false;
		Iterator it=this.rankingList.iterator();
		while(it.hasNext() && !enc){
			Ranking listRank=(Ranking)it.next();
			if(listRank.equals(rank))
				enc=true;
		}
		if(!enc){
			this.rankingList.add(rank);
		}
		return enc;
		
	}
	
	
	

	
	
}
